//
//  DateTool.swift
//  MakeMoney
//
//  Created by Fan ZhiQiang on 2024/12/18.
//

import Foundation

var nowYear: Int {
    Calendar.current.component(.year, from: Date.now)
}

var nowMonth: Int {
    Calendar.current.component(.month, from: Date.now)
}

var nowDay: Int {
    Calendar.current.component(.day, from: Date.now)
}

var lotteryStartDate: Date {
    let calendar = Calendar.current
    let startDate = calendar.date(from: DateComponents(year: 2007, month: 1, day: 1)) ?? Date()
    return startDate
}

var lotteryEndDate: Date {
    let calendar = Calendar.current
    let startDate = calendar.date(from: DateComponents(year: 2025, month: 3, day: 11)) ?? Date()
    return startDate
}


func dateRange() -> ClosedRange<Date> {
    lotteryStartDate...Date()
}

